<script setup lang="ts">
function handleClickLeft() {
  uni.navigateBack()
}
const typeList = [
  {
    name: '称重',
    value: '称重',
  },
  {
    name: '默认',
    value: '默认',
  },
]
</script>

<template>
  <view class="h-full flex flex-col overflow-hidden">
    <wd-navbar title="新建单位" left-text="返回" left-arrow @click-left="handleClickLeft" />
    <scroll-view
      scroll-y
      class="box-border flex-1 overflow-hidden p-[10px]"
      :show-scrollbar="false"
    >
      <custom-wd-input
        required
        custom-input-class="text-align-right"
        label="单位名称"
        placeholder="例如：份"
        placeholder-class="text-align-right"
      />
      <custom-wd-input-single-select
        :list="typeList"
        required
        custom-input-class="text-align-right"
        c-class="mt-3"
        label="名称类型"
        placeholder="请选择"
        title="请选择名称类型"
        placeholder-class="text-align-right"
      />
      <wd-cell title="已关联菜品（0）" class="mt-3 rounded-lg" vertical>
        <view
          class="mt-4 h-[110px] flex flex-col items-center justify-center rounded-lg bg-[#f2f2f2]"
        >
          <wd-text text="暂未关联菜品" color="#333" size="12px" />
          <view class="mt-4">
            <wd-button
              type="text"
              class="ml-2"
              plain
              :round="false"
              custom-class="w-[100px] h-[25px]"
              size="small"
            >
              关联菜品
            </wd-button>
          </view>
        </view>
      </wd-cell>
    </scroll-view>
    <view class="flex border-t-1 border-border border-t-solid bg-white p-4">
      <wd-button type="primary" :round="false" class="flex-1">保存</wd-button>
    </view>
  </view>
</template>

<style scoped lang="scss"></style>
